﻿{include file="public/head" title="个人中心" keywords="个人中心" description="个人中心" /}
<style>

	.wdzh_main{
		background: #fff;
	}
	.midd-line{
		clear: both;
		width: 100%;
		height: 0.09rem;
		background: #e1e1e8;
	}
	.mui-switch:before{
		content: '休息';
	}
	.mui-switch.mui-active:before{
		content: '接单';
	}
</style>
		<div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable">
		<!-- 菜单容器 -->
			<div class="mui-inner-wrap">
				<div id="offCanvasContentScroll" class="mui-content mui-scroll-wrapper">
					<div class="mui-scroll">
						<header class="wdzh_header">
							<p>师傅中心
								<!--<a id="offCanvasBtn" href="#offCanvasSide" class="mui-icon mui-action-menu mui-icon-bars mui-pull-right" style="color:#fff;"></a>-->
							</p>

							<div class="wdzh_header_div1">
								<div class="iconfont">
										<img style="border: 0;width: 68px;height:68px;border-radius: 50%;" src="{$user.head}" alt="">
								</div>
								<div class="wdzh2_div">
									<p>{$user['user_name']}
									</p>
									<h6 style="margin-top: -4px;margin-left: -19px;"><a style="color: #d7ffff" href="{:url('myimg',['userid'=>$user['id']])}">[我的二维码]</a></h6>

								</div>
								<!--<a href="{:url('Account/userinfo',['userid'=>$user['id']])}"><span class="mui-icon mui-icon-arrowright wdzh2_div_span"></span></a>-->

								<div style="clear: both;"></div>
							</div>
							<span style="margin-top: 6rem;">
								<div class="mui-switch {if condition='$user.iswork eq 1'} mui-active {/if}" data-id="{$user.iswork}" id="mySwitch" style="margin-left: 103px;border: 2px solid #00bfb0;" data-off="0" data-on = "1">
									<div class="mui-switch-handle"></div>
								</div>
							</span>
							<div class="wdzh_header_div2" style="margin-top: 3rem;    background: #00b8a9;height: 3rem; padding-top: 1rem;">
								{php}$zong = $user['yue'] + $user['cz_yue']; {/php}
								<div><a href="{:url('tixian')}" style="color: #fff;">余额{$zong|default='0'}（元）</a></div>
								<div class="wdzh_header_div2_m" style="margin-bottom: 0.5rem;"></div>
								<div><a href="{:url('getpaylist')}" style="color: #fff;">我的钱包</a></div>
								<div style="clear: both;"></div>
							</div>
							<div class="wdzh_header_div2" style="border-top: 1px solid #eee;  background: #00b8a9;height: 3rem; padding-top: 1rem;">
								<div><a href="{:url('baozjinview')}" style="color: #fff;"> 保证金{$user.baozhenjin|default='0'}（元）</a></div>
								<div class="wdzh_header_div2_m" style="margin-bottom: 0.5rem;"></div>
								<div><a href="{:url('Account/toauth')}"  style="color: #fff;">身份认证</a></div>
								<div style="clear: both;"></div>
							</div>
						</header>
						<main class="wdzh_main">
							<!--<section class="wdzh_main_section1">-->
								<!--<div>-->
									<!--<a href="{:url('Account/orders',['status'=>1,'userid'=>$user['id']])}"><div>-->

										<!--<span class="iconfont icon-qiapian" style="font-size: 2.1rem;color: #ff5555"></span>-->
										<!--<p class="tbp" style="margin-top: -0.2rem">待付款</p>-->
									<!--</div></a>-->
								<!--</div>-->
								<!--<div>-->
									<!--<a href="{:url('Account/orders',['status'=>2,'userid'=>$user['id']])}"><div>-->

										<!--<span class="iconfont icon-feiji" style="font-size: 2.6rem;color: #faaf42"></span>-->
										<!--<p class="tbp" style="margin-top: -0.4rem">未派单</p>-->
									<!--</div></a>-->
								<!--</div>-->
								<!--<div>-->
									<!--<a href="{:url('Account/orders',['status'=>3,'userid'=>$user['id']])}"><div>-->

										<!--<span class="iconfont icon-xinxing" style="font-size: 1.9rem;color: #39bb58"></span>-->
										<!--<p class="tbp"style="margin-top: -0.1rem">服务中</p>-->
									<!--</div></a>-->
								<!--</div>-->
								<!--<div>-->
									<!--<a href="{:url('Account/orders',['status'=>4,'userid'=>$user['id']])}"><div>-->

										<!--<span class="iconfont icon-dingdanyiwancheng" style="font-size: 1.9rem;color: #5db2ff"></span><p class="tbp" style="margin-top: -3px;">已完成</p>-->
									<!--</div></a>-->
								<!--</div>-->
								<!--<div>-->
									<!--<a href="{:url('Account/orders',['status'=>4,'userid'=>$user['id']])}"><div>-->

										<!--<span class="iconfont icon-dingdanyiwancheng" style="font-size: 1.9rem;color: #5db2ff"></span><p class="tbp" style="margin-top: -3px;">已完成</p>-->
									<!--</div></a>-->
								<!--</div>-->
								<!--<div>-->
								<!--<a href="{:url('Account/orders',['status'=>4,'userid'=>$user['id']])}"><div>-->

									<!--<span class="iconfont icon-dingdanyiwancheng" style="font-size: 1.9rem;color: #5db2ff"></span><p class="tbp" style="margin-top: -3px;">已完成</p>-->
								<!--</div></a>-->
							<!--</div>-->
							<!--</section>-->
							<article class="main_a" style="margin-top: 0.4rem;">


								<div class="main_a_main">
									<div>
										<a href="{:url('ontorder')}"><span class="mui-icon" style="background: #E03636;">{$data.order}个</span>
										<h5 class="left_h5">待接单</h5>
										</a>
									</div>
									<div>
										<a href="{:url('hasoerder',['type'=>1])}"><span class="mui-icon "style="background: #FF534D;">{$data.tpye1}个</span>
										<h5 class="left_h5">待服务</h5>
										</a>
									</div>
									<div>
										<a href="{:url('hasoerder',['type'=>2])}"><span class="mui-icon ">{$data.tpye2}个</span>
										<h5 class="left_h5">已完成</h5>
										</a>
									</div>
									<div>
										<a href="{:url('hasoerder',['type'=>3])}"><span class="mui-icon "style="background: #797978;">{$data.tpye3}个</span>
										<h5 class="left_h5">已转出</h5>
										</a>
									</div>
									<div>
										<a href="{:url('hasoerder',['type'=>4])}"><span class="mui-icon "style="background: #8f8f8e;">{$data.tpye4}个</span>
										<h5 class="left_h5">已取消</h5>
										</a>
									</div>

									<div>
										<a href="#"><span class="mui-icon ">{$data.total}%</span>
										<h5 class="left_h5">完成率</h5>
										</a>
									</div>

									<div style="clear: both;"></div>
								</div>


								<div style="clear:both;width: 100%; height: 0.4rem; background: #efeff4;"></div>
							</article>
							<!--<div class="midd-line"></div>-->
							<!--<section class="wdzh_main_section2" >-->
								<!--<ul class="mui-table-view" style="border-bottom: 0.4rem solid #e1e1e8;">-->
									<!--<li class="mui-table-view-cell" data-src="{:url('Account/orders',['userid'=>$user['id']])}" ><span class="iconfont icon-dingdan" style="color: #579aea;"></span>全部订单</li>-->
								<!--</ul>-->
								<!--<ul class="mui-table-view">-->
									<!--<li class="mui-table-view-cell"><span class="iconfont icon-zhifeiji" style="color: #ff5555;"></span>发布订单<a href="{:url('Account/tosendorder',['userid'=>$user['id']])}" style="color: #01cebf">我要发布订单<span class="iconfont icon-jiahao" style="float: right;margin-left: 0.5rem;margin-right: 0.5rem;"></span></a></li>-->
								<!--</ul>-->
							<!--</section>-->
							<!--<section class="wdzh_main_section1" style="height: 6rem;">-->
								<!--<div style="border-right:0.1rem solid #ededed">-->
									<!--<a href="{:url('Account/order',['status'=>1,'userid'=>$user['id']])}"><div style="line-height: 4rem;">-->

										<!--<p class="tbp">待付款</p>-->
									<!--</div></a>-->
								<!--</div>-->
								<!--<div style="border-right:0.1rem solid #ededed">-->
									<!--<a href="{:url('Account/order',['status'=>2,'userid'=>$user['id']])}"><div style="line-height: 4rem;">-->

										<!--<p class="tbp" >待接单</p>-->
									<!--</div></a>-->
								<!--</div>-->
								<!--<div style="border-right:0.1rem solid #ededed">-->
									<!--<a href="{:url('Account/order',['status'=>3,'userid'=>$user['id']])}"><div style="line-height: 4rem;">-->

										<!--</span><p class="tbp">服务中</p>-->
									<!--</div></a>-->
								<!--</div>-->
								<!--<div style="border-right:0.1rem solid #ededed">-->
									<!--<a href="{:url('Account/order',['status'=>4,'userid'=>$user['id']])}"><div style="line-height: 4rem;">-->

										<!--<p class="tbp" style="margin-top: -3px;">已完成</p>-->
									<!--</div></a>-->
								<!--</div>-->

							<!--</section>-->
							<!--<div style="clear: both;width: 100%;height: 0.37rem;background: #e1e1e8;"></div>-->

							<section class="wdzh_main_section2">
								<ul class="mui-table-view">
									<!--<li class="mui-table-view-cell" data-src="{:url('Account/setmoney',['userid'=>$user['id']])}"><span class="iconfont icon-chongzhi" style="color: #faae27;font-size: 1.5rem;"></span>预存充值<a href="{:url('Account/setmoney',['userid'=>$user['id']])}" class="mui-navigate-right"><b></b></a></li>-->
									<!--<li class="mui-table-view-cell" data-src="{:url('Account/getpaylist',['userid'=>$user['id']])}"><span class="iconfont icon-qia101" style="color: #5fbf5c;"></span>充值记录<a href="{:url('Account/getpaylist',['userid'=>$user['id']])}" class="mui-navigate-right"><b></b></a></li>-->
									<li class="mui-table-view-cell" data-src="{:url('Account/hasoerder')}"><span class="iconfont icon-dingdan" style="color: #00bfb0;"></span>全部订单<a href="{:url('Account/hasoerder')}" class="mui-navigate-right"><b>&nbsp;&nbsp;</b></a></li>
									<li class="mui-table-view-cell" data-src="{:url('Account/jionme',['userid'=>$user['id']])}"><span class="iconfont icon-weixiu" style="color: #ff5555;"></span>技能选择<a href="{:url('Account/jionme',['userid'=>$user['id']])}" class="mui-navigate-right"><b>&nbsp;&nbsp;</b></a></li>
									<!--<li class="mui-table-view-cell" data-src="{:url('Account/toauth',['userid'=>$user['id']])}"><span class="iconfont icon-fuwuzhong" style="color: #01cebf;"></span>服务师认证<a href="{:url('Account/toauth',['userid'=>$user['id']])}" class="mui-navigate-right"><b>&nbsp;&nbsp;</b></a></li>-->


									<li class="mui-table-view-cell" data-src="{:url('Account/addarea')}"><span class="iconfont icon-fuwuzhong" style="color: #ff5349;"></span>服务区域<a href="{:url('Account/addarea')}" class="mui-navigate-right"><b>&nbsp;&nbsp;</b></a></li>
									<li class="mui-table-view-cell" data-src="tel:{$tle.tile}"><span class="iconfont icon-fuwuerji" style="color: #d99ce2;"></span>联系客户<a href="tel:{$tle.tile}" class="mui-navigate-right">{$tle.tile}</a></li>
									<!--<li class="mui-table-view-cell" data-src="{:url('Setting/index')}"><span class="iconfont icon-iconfonticonfontjixieqimo" style="color: #CC3E47;"></span>账号设置<a href="{:url('Setting/index')}" class="mui-navigate-right"><b style="font-weight:lighter;">密码设置与修改</b></a></li>-->
									<li class="mui-table-view-cell" data-src="{:url('Account/problem')}"><span class="iconfont icon-wenti3" style="color: #ff5349;"></span>常见问题<a href="{:url('Account/problem')}" class="mui-navigate-right"><b>&nbsp;&nbsp;</b></a></li>
								</ul>
							</section>
							<!--<section class="wdzh_main_section3">-->

								<!--&lt;!&ndash; <p>客服电话：400-862-1588</p> &ndash;&gt;-->
							<!--</section>-->
						</main>
					</div>
				</div>
				<div class="mui-off-canvas-backdrop"></div>
			</div>
		</div>

		{include file="public/footer"}
<script>
	mui(".mui-table-view").on('tap','.mui-table-view-cell',function(){
		var src = $(this).data('src');
		window.location.href = src;
	});
    document.getElementById("mySwitch").addEventListener("tap", function() {
        //调用隐藏/显示弹出层
        var iswork = $('#mySwitch').attr('data-id');
        $.ajax({
            type:"post",
            url:'{:url("iswork")}',
            dataType:"json",
            data:{iswork:iswork},
            success: function(data){ console.log(data.data.data)
                if(data.code == 1){
                    $('#mySwitch').attr('data-id',data.data.data);
//                    layer.msg(data.msg, {icon: 6, time: 1000},function(){
//
//                    });
                }else{
                    layer.msg(data.msg, {icon: 5, time: 2000});
                }
            }
        });
    })
</script>
	</body>
</html>